--1--
SELECT username,password FROM user WHERE surname = 'Papadopoulos' AND birthdate>='1980-01-01';
--2--
SELECT * FROM recipe ORDER BY kcal ASC, portions ASC;
--3--
SELECT title, reg_date_time FROM recipe WHERE portions>4 AND prescription LIKE '%pairnoume%' order by reg_date_time ASC;
--4--
SELECT username, count( * ) FROM recipe GROUP BY username HAVING count( * ) >1;
--5--
SELECT count( * ) , recipe_AA FROM contains GROUP BY recipe_AA,recipe_username ORDER BY count( * ) DESC; 
--6--
SELECT a.title AS child, b.title AS parent FROM category AS a LEFT JOIN category AS b ON a.fid = b.id;
--7--
SELECT name, surname, birthdate
FROM user
INNER JOIN editor ON user.username=editor.username
WHERE biography LIKE 'Gennithike%';
--8--
SELECT name, surname, category.title
FROM user
INNER JOIN editor ON user.username=editor.username
INNER JOIN recipe ON editor.username=recipe.username
INNER JOIN category ON category.id=recipe.cat_id
WHERE category.title LIKE 'italikh kouzina' 
OR category.title LIKE 'me3ikanikh kouzina'
ORDER BY surname;
--9--
SELECT recipe.title, quantity
FROM recipe
INNER JOIN contains ON recipe_AA=AA AND username=recipe_username
INNER JOIN ingredient ON ingredient.id=ingr_id
WHERE ingredient.description='ladi';
--10--
SELECT name, surname, count( * )
FROM user
INNER JOIN rating ON user.username = rating.user_username
GROUP BY rating.user_username
HAVING count( * ) >1;